package com.starblink.utils.ext.other

class FastUtils {
    companion object {
        /**
         * 判断两次点击的间隔，如果小于diff，则认为是多次无效点击
         *
         * @param diff
         * @return
         */
        private var lastClickTime: Long = 0
        fun  isFast(delayTime:Int=500) :Boolean {
            val time = System.currentTimeMillis()
            val timeD = time - lastClickTime
            if (lastClickTime > 0 && timeD < delayTime) {
                return true
            }
            lastClickTime = time
            return false
        }
    }
}